package com.xueke.crawler.dao;

import com.xueke.crawler.model.SubjectTree;
import com.xueke.crawler.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Created by weibo on 2017/5/13.
 *
 * @author weibo.qin
 * @version 2017/5/13
 */
@Mapper
public interface UserMapper {

    @Select("select name,password from tbl_xueke_user where `type` = #{userType} limit #{start},1")
    public User queryUser(@Param("start") int start, @Param("userType") String userType);

    @Update("update tbl_xueke_user set `type` = -9999 where name = #{userId}")
    public void updateUserStatus(@Param("userId") String userId);

}
